#ifndef FTCOMPASS_H
#define FTCOMPASS_H

#include <QtGui>

#include <QCompass>
#include "ftcontrols.h"
QTM_USE_NAMESPACE

class FTCompass : public QWidget
{
    Q_OBJECT
public:
    explicit FTCompass(QWidget* parent = NULL);
    explicit FTCompass(const QSize&, QWidget* parent = NULL);
    explicit FTCompass(FTControls::IconSize, QWidget* parent = NULL);

    void paintEvent(QPaintEvent *);
    void timerEvent(QTimerEvent *);
    QSize sizeHint() const;
    QSize minimumSizeHint() const;
    double bearing() const;

signals:
    void bearingChange(qreal);

public slots:
    void setBearing(qreal);

private:
    void initialize();

    bool force_size;
    QSize _forcedSize;
    bool use_external;
    qreal _bearing;
    QCompass compass;

};

#endif // FTCOMPASS_H
